﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tayninh2011
{
    class TnThreadClassFrmLogin
    {
      FrmLogin myFormControl1;

      public TnThreadClassFrmLogin(FrmLogin myForm)
      {
          myFormControl1 = myForm;
          
      }

      public void Run(object mydelegate)
      {
          myFormControl1.Invoke((Delegate)mydelegate);
          //switch (mydelegate)
          //{
          //    case "myDelegate":
          //        myFormControl1.Invoke(myFormControl1.myDelegate);
          //        break;
          //    case "advanceDel":
          //        myFormControl1.Invoke(myFormControl1.advanceDel);
          //        break;
          //}
          
         // Execute the specified delegate on the thread that owns
         // 'myFormControl1' control's underlying window handle.
         
      }
    }
}
